#include <exception>
#include <iostream>

void ExtractDX9(const char* szInputFile);

int main(int argc, char** argv)
{
	try
	{
		if (argc == 3)
		{
			const char* szInputFile = argv[1];
			const char* szPlatform = argv[2];

			if (_stricmp(szPlatform, "dx9") == 0)
			{
				ExtractDX9(szInputFile);
			}
			else if (_stricmp(szPlatform, "dx10") == 0)
			{

			}
			else if (_stricmp(szPlatform, "dx11") == 0)
			{

			}
			else if (_stricmp(szPlatform, "opengl") == 0)
			{

			}
		}
	}
	catch (std::exception e)
	{
		std::cout << e.what() << std::endl;
		return 1;
	}
	catch (...)
	{
		std::cout << "Unknown exception caught" << std::endl;
		return 1;
	}

	return 0;
}